package com.huluobo.high3videoproject;

import android.app.Application;

import com.huluobo.high3videoproject.utils.DBUtils;
import com.hyphenate.chat.EMClient;
import com.hyphenate.chat.EMOptions;
import com.tencent.rtmp.TXLiveBase;
import com.umeng.commonsdk.UMConfigure;
import com.umeng.socialize.PlatformConfig;

public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        //初始化友盟
        UMConfigure.init(this, "64e852935488fe7b3afd5ebc", "umeng", UMConfigure.DEVICE_TYPE_PHONE, "");
        PlatformConfig.setQQZone("254775", "228B9ED0421EB654C6C8B1FB3CB160DC");

        //初始化腾讯云直播
        String licenceURL = "https://license.vod2.myqcloud.com/license/v2/1320478037_1/v_cube.license"; // 获取到的
        // licence url
        String licenceKey = "bda6a2847e2ae14ecfc31ad5d0ddcb39"; // 获取到的 licence key
        TXLiveBase.getInstance().setLicence(this, licenceURL, licenceKey);

        //初始化环信
        EMOptions options = new EMOptions();
        options.setAppKey("moroks#day10-im");
        EMClient.getInstance().init(this, options);

        //初始化数据库
        DBUtils.getInstance().init(this);
    }
}
